<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
      xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
      layout:decorator="layouts/main">
<head>
    <th:block layout:include="nav :: head"></th:block>
</head>
<div layout:fragment="page-nav">
    <th:block layout:replace="nav :: nav"></th:block>
</div>
<div class="island" layout:fragment="page-content">
    <h1>Change Password</h1>
    <div class="island-content">
        <form th:action="@{/change_password.do}" method="post" novalidate="novalidate">
            <div th:if="${message}" th:text="${message}" class="error-message"></div>
            <div th:if="${message_code}" th:text="#{'change_password.' + ${message_code}}" class="error-message"></div>
            <input name="current_password" type="password" placeholder="Current password" autocomplete="off" autofocus="autofocus" class="form-control"/>
            <input name="new_password" type="password" placeholder="New password" autocomplete="off" class="form-control"/>
            <input name="confirm_password" type="password" placeholder="Confirm new password" autocomplete="off" class="form-control"/>
            <input type="submit" value="Change password" class="island-button"/>
        </form>
    </div>
</div>
</html>